package com.myhome.money.spring.lifecycle.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

/**
 * 如果不配置开启异步 @EnableAsync 则@async注解不会起作用
 * 如果是xml配置则需要下面的：
 * <task:annotation-driven executor="asyncExecutor" />
 * <task:executor id="asyncExecutor" pool-size="100-10000" queue-capacity="10"/>
 *
 * @author Rod
 */
@Configuration
@EnableAsync
@ComponentScan(basePackages = {"com.myhome.money.spring.lifecycle"}, excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = EnableWebMvc.class)})
public class RootConfig {

}
